package com.xzh.model;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Getter;
import lombok.Setter;
import jakarta.validation.constraints.*;

import java.util.Date;

@Setter
@Getter
@TableName("teachers")
@JsonIgnoreProperties({"handler", "hibernateLazyInitializer"})
public class Teachers {
    @TableId(type = IdType.AUTO)
    private Integer teacherId;

    @TableField(condition = SqlCondition.LIKE, whereStrategy = FieldStrategy.NOT_EMPTY)
    @NotBlank(message = "教师名称不可为空")
    private String teacherName;

    @NotBlank(message = "邮箱不可为空")
    @Email(message = "请输入正确的邮箱格式")
    private String email;

    private String phone;
    private String department;
    private String status;

    @NotBlank(message = "职称不可为空")
    private String title;

    private Date createTime;
    private Date updateTime;
}
